import request from '@/utils/request'

// 查询付款计划管理列表
export function listCwPaymentPlan(query) {
  return request({
    url: '/affairs/cwPaymentPlan/list',
    method: 'get',
    params: query
  })
}

// 支付
export function payForTheOrder(data) {
  return request({
    url: '/affairs/cwPaymentPlan/payForTheOrder',
    method: 'put',
    data: data
  })
}

// 查询付款计划管理详细
export function getCwPaymentPlan(id) {
  return request({
    url: '/affairs/cwPaymentPlan/' + id,
    method: 'get'
  })
}

// 新增付款计划管理
export function addCwPaymentPlan(data) {
  return request({
    url: '/affairs/cwPaymentPlan',
    method: 'post',
    data: data
  })
}

// 修改付款计划管理
export function updateCwPaymentPlan(data) {
  return request({
    url: '/affairs/cwPaymentPlan/update',
    method: 'put',
    data: data
  })
}

// 删除付款计划管理
export function delCwPaymentPlan(id) {
  return request({
    url: '/affairs/cwPaymentPlan/' + id,
    method: 'delete'
  })
}
